package com.andaily.domain.dto.developer;

import com.andaily.domain.developer.Backlog;
import com.andaily.domain.developer.BacklogType;
import com.andaily.domain.developer.SprintPriority;

/**
 * Date: 13-9-5
 *
 * @author Shengzhao Li
 */
public class BacklogFormDto extends BacklogDto {

    private boolean addNext;

    public BacklogFormDto() {
    }

    public BacklogFormDto(Backlog backlog) {
        super(backlog);
    }

    public BacklogFormDto(String guid) {
        this.guid = guid;
    }

    @Override
    public boolean isNewly() {
        return super.isNewly() || "create".equalsIgnoreCase(guid);
    }

    public boolean isAddNext() {
        return addNext;
    }

    public void setAddNext(boolean addNext) {
        this.addNext = addNext;
    }

    public BacklogType[] getAvailableTypes() {
        return BacklogType.values();
    }

    public SprintPriority[] getAvailablePriorities() {
        return SprintPriority.values();
    }

}
